﻿package
{
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import org.flixel.FlxSprite;
	import caurina.transitions.Tweener;
	import caurina.transitions.properties.ColorShortcuts;


	public class ASBackground
	{
		[Embed(source = 'data/bg1.png')] private var bg1:Class; // 'black'
		[Embed(source = 'data/bg2.png')] private var bg2:Class; // 'blue'
		[Embed(source = 'data/bg3.png')] private var bg3:Class; // 'purple'
		[Embed(source = 'data/bg4.png')] private var bg4:Class; // 'turq'
		[Embed(source = 'data/bg5.png')] private var bg5:Class; // 'gray'
		[Embed(source = 'data/bg6.png')] private var bg6:Class; // 'black'
		
		private var bg:Array;
		
		private var buf:Bitmap;
		private var spr:FlxSprite;
		
		public function ASBackground()
		{
			bg = [
				new FlxSprite(0, 0, bg1)
				, new FlxSprite(0, 0,bg2)
				, new FlxSprite(0, 0,bg3)
				, new FlxSprite(0, 0,bg4)
				, new FlxSprite(0, 0,bg5)
				, new FlxSprite(0, 0,bg6)
			];
		}
		
		public function getImage(score:int, gameover:Boolean = false):FlxSprite
		{
			var mult:uint = ASF.getMultiplier(score);
			
			if (gameover) {
				bg[mult].color = 0xFFFF3030;
			} else {
				bg[mult].color = 0xFFFFFFFF;
			}
			
			return bg[mult];
		}
	}
}